<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>我的订单</title>
    <link rel="stylesheet" href="index.css">
    <link rel="stylesheet" href="apply.css">
    <link rel="stylesheet" href="car.css">

</head>

<body>
    <header>
        <div class="nav">
            <!-- 头部左侧文字链接 -->
            <ul class="nav-left">
                <li class="conweixin">
                    <a href="javascript:;">关注</a>
                    <div class="weixin">
                        <div class="weixin-con">
                            <img src="img/weChat.jpg" alt="">
                            <p>关注公众号</p>
                        </div>
                    </div>
                </li>
                <li class="loadapp">
                    <a href="javascript:;">下载APP</a>
                    <div class="app">
                        <div class="app-con">
                            <img src="img/app.jpg" alt="">
                            <p>优购app下载</p>
                        </div>
                    </div>
                </li>
            </ul>

            <!-- 头部右侧文字链接 -->
            <ul class="nav-right">
                <li>
                    <a href="javascript:;" class="mylist">我的订单</a>
                </li>
                <li><a href="index.html">回到首页</a></li>

                <li class="collect">
                    <a href="javascript:;"><i></i>收藏</a>
                </li>
                <li class="bag">
                    <a href="javascript:;"><i></i>购物袋</a>
                </li>
                <li class="publicword">
                    <a href="javascript:;">公告</a>
                    <div class="public">
                        <ul class="public-con">
                            <li><a href="javascript:;" class="red">近期物流情况安排通知</a></li>
                            <li><a href="javascript:;">优购客服电话变更</a></li>
                            <li><a href="javascript:;">关闭分享购频道</a></li>
                            <li><a href="javascript:;">提醒会员谨防诈骗电话</a></li>
                        </ul>
                    </div>
                </li>
            </ul>
        </div>
    </header>

    <div class="ok">
        <table class="car" style="display: block;">
            <colgroup>
                <col width="100">
                <col width="300">
                <col width="130">
                <col width="150">
                <col width="130">
                <col width="180">
            </colgroup>
            <thead>
                <tr>
                    <th>商品图</th>
                    <th>商品名称</th>
                    <th>颜色尺码</th>
                    <th>单价</th>
                    <th>数量</th>
                    <th>小计(元)</th>
                </tr>
            </thead>
            <tbody>
                <% mylist.forEach(function(item){ %>

                    <tr id="<%= item.id %>">
                        <td class="choose">
                            <img src="<%= item.img %>" alt="">
                        </td>
                        <td class="gname">
                            <%= item.gname %>
                        </td>
                        <td class="cs">
                            <p class="gcolor">颜色：<span>图片色</span></p>
                            <p class="gsize">尺码：<span>F</span></p>
                        </td>

                        <td class="gprice">
                            <%= item.gprice %>
                        </td>
                        <td class="gcount">
                            <%= item.count %>
                        </td>
                        <td class="sum">
                            <%= item.sum %>
                        </td>
                    </tr>
                    <% }) %>

            </tbody>
            <!-- <tbody>
                <tr>
                    <td class="choose">
                        <p><img src="img/b11.jpg" alt=""></p>
                    </td>
                    <td class="gname">BELLE/百丽箱包2020新商场同款菱格链条包单肩斜挎女包X4926AN0</td>
                    <td class="cs">
                        <p class="gcolor">颜色：<span>黑色</span></p>
                        <p class="gsize">尺码：<span>F</span></p>
                    </td>

                    <td class="gprice">799</td>
                    <td class="gcount">
                        <span class="num">1</span>
                    </td>
                    <td class="sum">598</td>
                </tr>
            </tbody> -->
        </table>
    </div>
</body>

</html>
<script src="jquery.min.js"></script>
<script src="index.js"></script>

<script>
    let uname = sessionStorage.getItem("uname");
    $(".bag a").attr("href", `/car?username=${uname}`);
</script>